package com.zyy.ui.exception;

import com.zyy.ui.enums.EnumForResultCode;

/**
 * @ClassName: BaseException
 * @Description: 基本异常处理类
 * @Author: zyy
 * @Date: 2020/04/25 22:15
 * @Version: 1.0
 */
public abstract class BaseException extends Exception {
    private String errorCode;

    public BaseException(EnumForResultCode enumForErrorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = enumForErrorCode.getResultCode();
    }

    public BaseException(EnumForResultCode enumForErrorCode) {
        super(enumForErrorCode.getDescribe());
        this.errorCode = enumForErrorCode.getResultCode();
    }

    public String getErrorCode() {
        return errorCode;
    }

}
